home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / umich / utils / undelete.arc / UNDELETE.DOC next >
Text File  |  1986-12-22  |  5KB  |  96 lines

  1.  
  2. U N D E L E T E  User Notes
  3.  
  4. The ST directory structure
  5.  
  6. Skip this part if you like, but be advised that UNDELETE will not always be
  7. able to recover your deleted file. This section will help you to understand
  8. why.
  9.  
  10. In order to keep track of the files and folders on a disk, TOS records two sets
  11. of data. The directory itself records the filename (or folder name), the time
  12. and date of creation or modification, the file length, several special-purpose
  13. flags (for example, 'read only'), and the location of the first 'cluster'
  14. belonging to the file. On the ST a cluster is an adjacent pair of sectors, 1024
  15. bytes.
  16.  
  17. A second set of data, the File Allocation Table or FAT, has an entry for each
  18. cluster indicating if it is in use, and if so, where to find the next cluster
  19. of this file, or whether this is the end-of-file cluster.
  20.  
  21. When TOS deletes a file, it does not erase the data in the file. Instead, it
  22. indicates that the file has been erased by replacing the first character of the
  23. file name with $E5 (i. e., decimal 229). It also modifies the File Allocation
  24. Table to indicate that the clusters previously belonging to the file are now
  25. available. It does this by writing a zero in the element corresponding to a
  26. particular cluster.
  27.  
  28. When a new file is created, the first available directory entry is used; this
  29. entry may have been previously used by a file that has been deleted, or it may
  30. be an entry that has never been used since the disk was last formatted -- if
  31. there are no '$E5' flags showing. Similarly, the newly created file (or, for
  32. that matter, a file which is being rewritten, and now requires additional
  33. clusters) uses the first available (empty -- showing '0') cluster, again
  34. possibly re-using clusters belonging to, and still retaining data from, an
  35. erased file.
  36.  
  37. Usually, if a single file has been erased, and no new file has been written
  38. (including modified files), it is possible to reconstruct the directory and FAT
  39. tables unamiguously. However, if several files have been deleted, proper
  40. reconstruction may not be possible, since their clusters may be intermixed in
  41. an unknown way. And if write activity has taken place on the disk since the
  42. deletion, it is unlikely that the file can be recovered, since its directory
  43. entry probably no longer exists.
  44.  
  45. How to use Undelete
  46.  
  47. Before going any further, I must repeat the warning that appears on the opening
  48. screen of Undelete: ONLY USE UNDELETE ON A DUPLICATE OF YOUR DISK. If you use
  49. the normal TOS function to copy the entire disk (not individual files), you
  50. will have a copy of all of the necessary information for Undelete to work
  51. without putting your original disk at risk.
  52.  
  53. Also, Undelete works only in medium resolution, and expects to find the subject
  54. disk in Drive A:, so set up your ST accordingly.
  55.  
  56. Load UNDELETE.PRG, and place your (duplicate) disk in Drive A. After clicking
  57. the OK box on the opening screen, select Undelete from the Function menu. A
  58. first-level (root) directory will be displayed and will show:
  59.  
  60. 1. Any deleted files which are still in the root directory, and
  61. 2. All folders in the root directory, deleted or otherwise (deleted folders
  62. will show up with a '#' in the first character).
  63.  
  64. Selecting a deleted file or folder displays a dialog box requesting the initial
  65. character (which has been replaced by the $E5 'delete flag'). After inserting
  66. the initial character, selecting 'Recover' recovers the file or folder.
  67. Selecting 'Cancel' will return you to the display of deleted files.
  68.  
  69. Selecting a non-deleted folder 'opens' the folder, showing all folders and all
  70. deleted files at the next level within the folder. You may then continue as
  71. with the root directory.
  72.  
  73. The 'close' box on the window will always back up the program by one stage. For
  74. example, if a folder is open, the folder will be closed and the directory which
  75. included the folder will be displayed. At the root directory, the close box
  76. backs out of the undelete function so that no function is selected. Selecting
  77. the close box again terminates the program.
  78.  
  79. Additional functions.
  80.  
  81. Since many of the same program procedures are required, a simple directory
  82. function is a part of the program. It opens and closes folders in exactly the
  83. same way as the undelete function.
  84.  
  85. A print function prints whatever directory is presently on the screen. This
  86. works as a subfunction under both the directory function and the undelete
  87. function.
  88.  
  89. A cancel function is also available; it immediately terminates the directory or
  90. undelete function without terminating the program, and without having to back
  91. out of several levels of subdirectories (folders) via the close box. The File
  92. Allocation Table (FAT) is read only on initial selection of one of the
  93. functions -- undelete or directory -- so a function should be canceled before
  94. using it to operate on a new disk.
  95.  
  96.